<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="keywords" content="淘宝京东1号店苏宁易购,全网购物聚合搜索,全网低价" />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jQuery模态窗口登陆效果</title>

    <link rel="stylesheet" type="text/css" media="all" href="../static/style.css">
    <link rel="stylesheet" href={{ url_for('static', filename='1.css') }}>
    <link rel="stylesheet" href={{ url_for('static', filename='1.css') }}>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">

    <script type="text/javascript" src="../static/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../static/jquery.leanModal.min.js"></script>
</head>

<style>
body{ text-align:center}
/* css注释：为了观察效果设置宽度 边框 高度等样式 */
</style>
<style>
    body{
    margin: 0px;
    padding: 0px;
        }
    #index{
        padding: 0;
        color: #8f8f94;
        font-size: 15px;
        width: 1400px;
        margin: 0;
    }
    #img{
        margin-top: 10px;
    }
    .al:hover {background: coral;}
    .al{background: #007aff;}
    .sc1:focus{
        transition:border linear .2s,box-shadow linear .5s;
        -moz-transition:border linear .2s,-moz-box-shadow linear .5s;
        -webkit-transition:border linear .2s,-webkit-box-shadow linear .5s;
        outline:none;border-color:coral;
        box-shadow:0 0 8px rgba(93,149,242,.105);
        -moz-box-shadow:0 0 8px rgba(93,149,242,.5);
        -webkit-box-shadow:0 0 8px rgba(93,149,242,3);
}
    .sc1{border:4px #007aff solid;width: auto}
    #bd{
        margin: 0;
        margin-left: 20px;
    }
    input {
    float: left;
}
</style>

<!--页面主体------------------------------------------------------------------------------>
<body>

<!--------------------------------------------------------------------------------------->


<div id="loginmodal" style="display:none;width: 400px;height: 400px;">
	<h1>登陆</h1>
	<form  id="loginform" name="c" method=get action="/login" enctype=multipart/form-data>
		<!--label for="username">账户名:</label-->

		<input type="text" name="username" id="username" class="txtfield" tabindex="1" placeholder="输入您的账号" style="font-size: 14px;margin-top: 50px;"/>

		<!--label for="password">密码:</label-->
		<input type="password" name="password" id="password" class="txtfield" tabindex="2" placeholder="请输入您的密码" style="font-size: 14px;margin-top: 25px;"/>


		<div class="center"><input type="submit" name="loginbtn" id="loginbtn" class="flatbtn-blu hidemodal" value="登陆" tabindex="3"style="text-decoration: none;height: 50px;width: 100px;margin-left: 85px;margin-top: 25px;margin-left: 100px;" >
        <a href="zhuche.html" style="float:left;font-size: 20px;text-decoration: none;margin-top: 50px;margin-left: 50px;">注册</a>
        </div>

         {% if error %}
            <p>{{ error }}  或者<a href="mima.html">忘记密码</a></p>

        {% endif %}
	</form>
</div>



<script type="text/javascript">
$(function(){

	$('#loginform').submit(function(e){
		return false;
	});

	//弹出层调用语句
	$('#modaltrigger').leanModal({
		top:110,
		overlay:0.45,
		closeButton:".hidemodal"
	});

});
</script>
    <div id="index">
        {% if i %}
            <a id="zh" href="#"style="margin-right: 80px;color: #2ac845;text-decoration: none;">你好!{{ i }}</a>
            <a id="sy" href="#"style="margin-right: 80px;margin-left: 650px;color: #aaaaaa;text-decoration: none;">首页</a>
            <a id="sc" href="#" style="color: #aaaaaa;text-decoration: none;">收藏商品</a>

        {% else %}
                <a id="sy" href="#"style="margin-right: 80px;margin-left: 650px;color: #aaaaaa;text-decoration: none;">首页</a>

                <!--div id="content"-->
		        <a href="#loginmodal" id="modaltrigger"style="margin-right: 80px;color: #aaaaaa;text-decoration: none;">登陆</a>
	            <!--/div--->
                <a id="zc" href="#" style="margin-right: 80px;color: #aaaaaa;text-decoration: none;">注册</a>
                <a id="sc" href="#" style="color: #aaaaaa;text-decoration: none;">收藏商品</a>
        {% endif %}
    </div>
    <div id="img" style=" border-style: none;float: left; margin-left: 100px;margin-right:50px;">
            <img src="../static/1.png" style="width: 190px;height: 100px;" title="无法显示">
    </div>
        <div id="bd" style="float: left;">
             <form action="" method=POST enctype=multipart/form-data >
                 {% if ss_text %}
                      <input id="sc1" class="sc1" type="text" placeholder={{ ss_text }}  name="username" style="height: 38px;width: 490px;margin-top: 30px;text-align: center;font-size: 15px;"/>
                     {% else %}
                     <input id="sc1" class="sc1" type="text" placeholder="请输入"  name="username" style="height: 38px;width: 490px;margin-top: 30px;text-align: center;font-size: 15px;"/>
                 {% endif %}
                              <input id="al" class="al" type="submit"  value="搜索" style="position: absolute; height:37px;width:120px;margin-top: 30px;border: none;font-size: 15px;" />
             </form>
        </div>
    <br>

<style>
    #all1 :hover{
    background: #f40;
    color: white;
    }
    #all1{

        color: #555555;
    }



    #tb1 :hover{
    background: #f40;
    color: white;
    }
    #tb1{

        color: #555555;
    }



    #jd1 :hover{
    background: #f40;
    color: white;
    }
    #jd1{

        color: #555555;
    }



    #ymx1 :hover{
    background: #f40;
    color: white;
    }
    #ymx1{

        color: #555555;
    }



    #1hd1 :hover{
    background: #f40;
    color: white;
    }
    #1hd1{

        color: #555555;
    }



    #jm1 :hover{
    background: #f40;
    color: white;
    }
    #jm1{

        color: #555555;
    }


    #sl1 :hover{
    background: #f40;
    color: white;
    }
    #sl1{

        color: #555555;
    }



    #all1 {
        background-size: 50px;
    }

</style>
    <div class="fl" id="fl" style="margin-top: 100px;margin-left: 10px;">
        <div id="all1" class="all1">
        <a id="all" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:85px;font-size: 17px;display:block;padding:10px 10px;">所有电商</a>
        </div>
        <div id="tb1" class="tb1">
        <a id="tb" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:25px;font-size: 17px;display:block;padding:10px 10px;">淘宝</a>
            </div>
        <div id="jd1" class="jd1">
        <a id="jd" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:25px;font-size: 17px;display:block;padding:10px 10px;">京东</a>
        </div>
        <div id="ymx1" class="ymx1">
        <a id="ymx" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:25px;font-size: 17px;display:block;padding:10px 10px;">亚马逊</a>
        </div>
        <div id="1hd1" class="1hd1">
        <a id="1hd" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:25px;font-size: 17px;display:block;padding:10px 10px;">1号店</a>
        </div>
        <div id="jm1" class="jm1">
        <a id="jm" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:25px;font-size: 17px;display:block;padding:10px 10px;">聚美优品</a>
        </div>
        <div id="sl1" class="sl1">
        <a id="sl" href="##" style="float: left;text-decoration: none;margin-right: 34px;margin-left:25px;font-size: 17px;display:block;padding:10px 10px;">苏宁易购</a>
        </div>




    </div>
<hr style="width: 880px;float: left;margin-left:90px;">

<!--弹出登陆框----------------------------------------------------------------------------------->

<style>
    .lr_1_1:hover{
    border: 2px solid #FF4400;
    }
    .lr_1_1{
        border: 0.5px solid #f0ad4e;
    }
</style>
<br>
{% if tmp %}
    <div class="lr">
    <div class="lr_1" style="margin-left: 80px;width: 1100px;">
           {% for i in tmp.keys() %}
                {% for l in tmp[i].keys() %}
                    <div class="lr_1_1" style="float: left;width: 220px;height: 360px;margin-left: 20px;margin-top: 20px;" >
                        <a href={{ tmp[i][l]['url'] }}><img src={{ tmp[i][l]['img'] }}  alt="请检查网络时候链接!"  style="max-width: 240px;max-height: 200px;"/></a><!--图片-->
                        <div>
                            <h4 style="float: left;margin-left: 10px;">¥{{ tmp[i][l]['jiage'] }}</h4><!--价格-->
                        </div>
                            {% if tmp[i][l]['fee']==0.0 %}
                                <h5 style="float: left;background-size: 9px;background: #f40;color: white;margin-top: 8px">包邮</h5>
                                {% else %}
                                    <h5 style="float: left;background-size: 9px;background: #ec971f;color: #007aff;">不包邮</h5>

                            {% endif %}
                        <div>
                            <h5 style="float: right">{{ tmp[i][l]['jiaoyinum'].decode('utf-8') }}</h5>
                        </div>
                        <div style="width: 200px;">
                        <a class="text1" href="{{ tmp[i][l]['url'] }}" style="font-size: 12px;float: left;margin-top: 5px;" > {{ i.decode('utf-8') }} </a><!--标题-->

                        </div>
                        <div>
                            <h6 style="float: left;margin-left: 8px;margin-top: 8px;">店铺:{{ tmp[i][l]['dname'].decode('utf-8') }}</h6>
                            <h6 style="float: right;margin-right: 8px;margin-top: 8px;">{{ tmp[i][l]['fahuodi'].decode('utf-8') }}</h6>
                        </div>
                        <div style="position: absolute;float: right;margin-top: 80px;margin-right: 8px;">
                            <a href="http://www.taobao.com"><img src="/static/taobao.png" style="width: 30px;height: 30px;" /></a>
                        </div>
                    </div>
                {% endfor %}
            {% endfor %}
    </div>
</div>
{% endif %}


{% if shiyuan %}
       <div class="lr">
    <div class="lr_1" style="margin-left: 80px;width: 1100px;">
           {% for i in shiyuan.keys() %}
                {% for l in shiyuan[i].keys() %}
                    <div class="lr_1_1" style="float: left;width: 220px;height: 360px;margin-left: 20px;margin-top: 20px;" >
                        <a href={{ shiyuan[i][l]['id'] }}><img src={{ shiyuan[i][l]['img'] }}  alt="请检查网络时候链接!"  style="max-width: 250px;max-height: 200px;"/></a><!--图片-->
                        <div>
                            <h3 style="float: left;margin-left: 2px;color: #cf2d28;">¥{{ shiyuan[i][l]['newjia'] }}</h3><!--价格-->
                            <del style="float: left;margin-left: 2px;margin-top: 8px;color: #7988a3;">¥{{ shiyuan[i][l]['oldjia'] }}</del>
                        </div>
                        <br>
                        <div style="float: left;margin-top: 5px;">
                        <a class="text1" href="{{ shiyuan[i][l]['id'] }}" style="font-size: 15px;margin-right: 20px;color: #8f8f94;" > {{ i.decode('unicode_escape') }} </a><!--标题-->

                        </div>
                        <div>
                            <h6 style="float: left;margin-left: 8px;margin-top: 8px;">店铺:{{ shiyuan[i][l]['dm'].decode('unicode_escape') }}</h6>

                        </div>
                        <br>
                        <h3 style="position: absolute;font-size: 12px;float: left;margin-left: 8px;margin-top: 70px;">卖出:{{'%.d'%(shiyuan[i][l]['nowmc']) }}</h3>
				            <div class="progress" style="position: absolute;margin-top: 85px;margin-left: 3px;width: 200px;">
                                {% if (shiyuan[i][l]['nowmc']/shiyuan[i][l]['suml'])*100 >= 100 %}
                                    <div class="progress-bar" style="width:100%;background:#d9534f;">
						                <span style="color: #ec971f;">100%</span>
					                </div>
                                {% else %}
					            <div class="progress-bar" style="width:{{ '%2.f%%'%((shiyuan[i][l]['nowmc']/shiyuan[i][l]['suml'])*100) }};background:#d9534f;">
						            <span style="color: #ec971f;">{{ '%2.f%%'%((shiyuan[i][l]['nowmc']/shiyuan[i][l]['suml'])*100) }}</span>
					            </div>
                                {% endif %}
				            </div>

                    <br>
                        <!--div style="position: absolute;float: right;margin-top: 80px;margin-right: 8px;">
                            <a href="http://www.taobao.com"><img src="/static/taobao.png" style="width: 30px;height: 30px;" /></a>
                        </div-->
                    </div>
                {% endfor %}
            {% endfor %}
    </div>
</div>
{% endif %}





</body>
</html>